<%@ page contentType="text/html;charset=UTF-8"%>

<script type="text/javascript">
$(function(){
	var uName = $.cookie("youleche.u");
	if(uName != null){
		var helpStr = "&nbsp;&nbsp;<span style=\"font-size:12px;color:#ccc;\">|</span>&nbsp;&nbsp;<a href=\"help.jsp\" style=\"color:#666;font-size:14px;\">帮助</a>";
		var myMeile = "<span style=\"color:#666;font-size:14px;\">欢迎你，</span><a  onclick=\"myMeile();\" style=\"cursor:pointer;color:#3CAC7E;font-size:16px;\">" +uName +"</a>";
		$("#divInfo").html(myMeile+helpStr);
	}
});

function myMeile(){
	var u = $.cookie("youleche.u");
	if(u == null){
		window.location.href = "${ctx}/login.jsp";
	}else{
		$.ajax({
			type : 'post',
			dataType : 'text',
			contentType : "application/json",
    		url: "login.do",
    		success: function(v){
    			if(v == "true"){
    				window.location.href = "${ctx}/user/index.jsp";
    			}else{
    				window.location.href = "${ctx}/login.jsp";
    			}
    		}
		});
	}
}
</script>
<style>
.linkLogin:link{
	text-decoration: none;
}
.linkLogin:hover{
	text-decoration: underline;
}
.linkLogin{
	font-size: 12px;
	color: #666;
}
</style>
<div class="top">
				<div class="topTitle">
					<div style="width: 400px; height: 80px; float: left;">
						<a href="http://www.meileche.com"><img src="${ctx}/image/ylc_logo.jpg" style="border-color: #fff;" title="美乐车"/></a>
					</div>
					<div style="width: 600px; height: 80px; float: left;">
						<div
							style="width: 200px; height: 30px; float: left; color: #444; font-size: 14px;">
								<br/>
								
								<br/>
								<br/>
						全国最大的车辆信息交易平台</div>
						<div style="width: 150px; height: 80px; float: left;padding-top: 30px;">
									
						</div>
						<div
							style="width: 250px; height: 30px; float: left; padding-top: 50px; color: #444; font-size: 18px;"
							align="right" id="divInfo">
							<a href="${ctx}/login.jsp"  class="linkLogin">登陆</a>&nbsp;<span style="font-size:12px;color:#ccc;">|</span>&nbsp;<a href="${ctx}/register.jsp" class="linkLogin">注册</a>
				&nbsp;<span style="font-size:12px;color:#ccc;">|</span>&nbsp;<a style="cursor:pointer;" onclick="myMeile();" class="linkLogin">我的美乐车</a>
				
						</div>
					</div>
				</div>
			</div>
